Skip to content

[AISOS-2083] Forge: support draft pull requests from repository metadata#120

Open
forgeSmith-bot wants to merge 2 commits into
forge-sdlc:mainfrom
forgeSmith-bot:forge/aisos-2083
Open

[AISOS-2083] Forge: support draft pull requests from repository metadata#120
forgeSmith-bot wants to merge 2 commits into
forge-sdlc:mainfrom
forgeSmith-bot:forge/aisos-2083

Conversation

@forgeSmith-bot

Copy link
Copy Markdown
Collaborator

This Pull Request implements task takeover for ticket [AISOS-2083].

Ticket Description

Problem Statement:
Forge currently opens generated GitHub pull requests as regular non-draft PRs. Some repositories need generated PRs to start as drafts so maintainers can inspect generated changes, adjust branch state, or decide when the PR is ready for formal review.

Proposed Solution/Approach:
Extend Forge's existing Jira repository metadata configuration with a per-repository boolean option that controls whether generated pull requests should be opened as drafts. Resolve the option when Forge creates a PR for that repository and pass GitHub's draft PR option when enabled. Preserve existing behavior when the option is omitted or false.

Acceptance Criteria:

  • Repository metadata supports a boolean option for opening generated PRs as drafts.

  • When enabled for a repo, Forge creates the initial GitHub PR as a draft.

  • When disabled or omitted, Forge creates a normal non-draft PR as it does today.

  • The option is documented in repository metadata configuration docs or examples.

  • Unit tests cover draft and non-draft PR creation behavior.

Co-authored-by: Forge forge@noreply.anthropic.com

Forge added 2 commits July 2, 2026 12:40
Auto-committed by Forge container fallback.
… pull requests

Detailed description:
- Added comprehensive unit tests in tests/unit/workflow/nodes/test_pr_creation_draft.py to verify draft and non-draft PR creation behavior across JiraClient, GitHubClient, and the PR creation node.
- Updated mock configurations in existing test suites (test_code_review.py and test_pr_creation_pr_number.py) to include mock implementations of is_repo_draft.
- Expanded docs/reference/config.md to document the structured repository configuration object schema, illustrating how to enable draft PRs under the 'forge.repos' project property.

Closes: AISOS-2083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant